Artifacts with DCC when render target also texture
https://bugs.freedesktop.org/show_bug.cgi?id=93216
Bug ID: 93216
Summary: Artifacts with DCC when render target also texture
Product: Mesa
Version: git
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/radeonsi
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
Created attachment 120280
--> https://bugs.freedesktop.org/attachment.cgi?id=120280&action=edit
Before a buggy draw call
I noticed a few games had some strange artifacts on my tonga that I had not on verde. Those artifacts are usually along lines.
These artifacts disappear with R600_DEBUG=nodcc.
I managed to determine the bug appears when the render target is also used as input texture.
Attached is the render target content before and after such draw call. The draw call draws two triangles. We can see the artifacts are along the border region of the top right triangle with the bottom left triangle.
My guess is that it is some flush issue. That the bottom left triangle is drawn first, the cache content of the texture cache updated, and the artifacts are at locations where the dcc data was updated.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=93216
--- Comment #1 from Axel Davy <[email protected]> ---
Created attachment 120281
--> https://bugs.freedesktop.org/attachment.cgi?id=120281&action=edit
After a buggy draw call
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=93216
Axel Davy <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #120280|0 |1
is obsolete| |
--- Comment #2 from Axel Davy <[email protected]> ---
Created attachment 120282
--> https://bugs.freedesktop.org/attachment.cgi?id=120282&action=edit
Before a buggy draw call
Repost of the first image, reported as PNG instead of text.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=93216
--- Comment #3 from Marek Olšák <[email protected]> --- What happens if you set these flush flags after every draw call?
SI_CONTEXT_FLUSH_AND_INV_FRAMEBUFFERSI_CONTEXT_INV_GLOBAL_L2SI_CONTEXT_INV_VMEM_L1SI_CONTEXT_PS_PARTIAL_FLUSH
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=93216
--- Comment #4 from Axel Davy <[email protected]> --- I added these at the end of si_emit_draw_packets.
It doesn't solve the problem.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=93216
--- Comment #5 from Bas Nieuwenhuizen <[email protected]> --- I think we have cache coherency issues within a single draw call. One of the situations in which a feedback loop is allowed is if we read and write every texel at most once and we read the texel from the fragment shader invocation that writes that texel.
My guess is that this is the case here, with two triangles. The problem is that while every pixel is written at most once, every block of pixels can be modified multiple times on the edges of a triangle.
This results in garbage if a later invocation for a tile sees modified pixel data but stale DCC compression data, or stale pixel data and modified DCC compression data.
This can be fixed by decompressing the framebuffer and disabling DCC decompression for the framebuffer. I would like to avoid decompressing, but I do not know how.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=93216
--- Comment #6 from Bas Nieuwenhuizen <[email protected]> --- Does the series available at
https://patchwork.freedesktop.org/series/8048/
fix this issue?
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=93216
Timothy Arceri <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #7 from Timothy Arceri <[email protected]> --- (In reply to Bas Nieuwenhuizen from comment #6)
Quoted 5 lines
Does the series available at
https://patchwork.freedesktop.org/series/8048/
fix this issue?
Hi Axel, those patches landed a long time ago. Is this issue still happening or can we close this bug?
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=93216
Axel Davy <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEEDINFO |RESOLVED--- Comment #8 from Axel Davy <[email protected]> --- The bug seems indeed to have been corrected since.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel